TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi | tutorial showing how to train , convert , and run | Machine Learning library
kandi X-RAY | TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Summary
kandi X-RAY | TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Summary
TensorFlow Lite is an optimized framework for deploying lightweight deep learning models on resource-constrained edge devices. TensorFlow Lite models have faster inference time and require less processing power, so they can be used to obtain faster performance in realtime applications. This guide provides step-by-step instructions for how train a custom TensorFlow Object Detection model, convert it into an optimized format that can be used by TensorFlow Lite, and run it on Android phones or the Raspberry Pi. The guide is broken into three major portions. Each portion will have its own dedicated README file in this repository. This repository also contains Python code for running the newly converted TensorFlow Lite model to perform detection on images, videos, or webcam feeds.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a tf example example
- Convert xml file to csv
- Refresh the camera
- Read the last frame
- Split a Pandas DataFrame into multiple files
TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Key Features
TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi Examples and Code Snippets
Community Discussions
Trending Discussions on TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi
QUESTION
I'm trying to create my own object detection model with TensorFlow 1 in the Anaconda environment. I wanted to use TensorFlow 1.15 and I followed this tutorial https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi
Cuz I'm new to this I followed tutorials on how to set up TensorFlow when I reach the step on setting up TensorFlow, I used the command pip install . to install TensorFlow using the setup.py in the research directory
After the installation, I used the command to test the TensorFlow setup to verify it works:
python builders\model_builder_tf1_test.py
However, I face the below error:
...ANSWER
Answered 2021-Nov-15 at 07:56Try to install the library using pip:
QUESTION
Overview
I know this subject has been discussed many times, but I am having a hard time understanding the workflow, or rather, the variations of the workflow.
For example, imagine you are installing TensorFlow on Windows 10. The main goal being to train a custom model, convert to TensorFlow Lite, and copy the converted .tflite file to a Raspberry Pi running TensorFlow Lite.
The confusion for me starts with the conversion process. After following along with multiple guides, it seems TensorFlow is often install with pip, or Anaconda. But then I see detailed tutorials which indicate it needs to be built from source in order to convert from TensorFlow models to TFLite models.
To make things more interesting, I've also seen models which are converted via Python scripts as seen here.
Question
So far I have seen 3 ways to do this conversion, and it could just be that I don't have a grasp on the full picture. Below are the abbreviated methods I have seen:
Build from source, and use the TensorFlow Lite Optimizing Converter (TOCO):
bazel run --config=opt tensorflow/lite/toco:toco -- --input_file=$OUTPUT_DIR/tflite_graph.pb --output_file=$OUTPUT_DIR/detect.tflite ...
Use the TensorFlow Lite Converter Python API:
...
ANSWER
Answered 2020-Jul-01 at 22:49There is no difference in the output from different conversion methods, as long as the parameters remain the same. The Python API is better if you want to generate TFLite models in an automated way (for eg a Python script that's run periodically).
The TensorFlow Lite Optimizing Converter (TOCO) was the first version of the TF->TFLite converter. It was recently deprecated and replaced with a new converter that can handle more ops/models. So I wouldn't recommend using toco:toco
via bazel, but rather use tflite_convert
as mentioned here.
You should never have to build the converter from source, unless you are making some changes to it and want to test them out.
QUESTION
I'm trying to use tensorflow lite in raspberry pi to detect specific category (motorcycle only) using the pre-trained model. Since the motorcycle category is already existing in the pre-trained model, I assume that I don't need any to retrain it. Is there anyway to remove other objects in the model? I am using the code from Edje Electronics provided by this link: https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi
'''
...ANSWER
Answered 2020-Apr-02 at 11:58I've solved my own problem by adding these lines of code inside the for loop.
for i in range(len(scores)):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi
Microsoft Build Tools 2015 Update 3 - Use the default installation options in the install wizard. Once you begin installing, it goes through a fairly large download, so it will take a while if you have a slow internet connection. It may give you some warnings saying build tools or redistributables have already been installed. If so, that's fine; just click through them.
Microsoft Visual C++ 2015 Redistributable Update 3 – This may give you an error saying the redistributable has already been installed. If so, that’s fine.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page